<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>验证用户名和密码</title>
</head>

<body>
    <script>
        var username = prompt("请输入用户名");
        var password = prompt("请输入密码");
        if (username == 'jty' && password == '123456') {
            alert('登陆成功!')
        } else {
            alert('登录失败!')
        }
    </script>
</body>

</html>